<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="__TEMPLATE__/webfile/css/main.css">
    <link rel="stylesheet" type="text/css" href="__TEMPLATE__/webfile/css/common.css" />
    <link rel="stylesheet" href="__TEMPLATE__/webfile/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="__TEMPLATE__/webfile/css/dai.css" />
</head>
<script src="__TEMPLATE__/webfile/js/jquery.js"></script>
<script src="__TEMPLATE__/webfile/js/bootstrap.min.js"></script>
<body>
<div class="main usercenter w">
    <div class="user_gamerecord w">
       <div class="user_right right " style="width: 100%">
            <div class="user_main">
                <div class="tabbable"> <!-- Only required for left/right tabs -->
                    <ul class="nav nav-tabs" style="padding-top: 5px;padding-left: 5px;height: 40px">
                    	<li class="active"><a href="#tab1" data-toggle="tab" class="badge badge-inversee" style="height: 23px">提现记录</a></li>
                        <li><a href="#tab2" data-toggle="tab" class="badge badge-inversee" style="height: 23px">在线取款</a></li>
                        
                    </ul>
                    <ul class="nav nav-tabs" style="padding-top: 5px;padding-left: 5px;height: 40px;position:fixed;top:0;z-index: 999;width: 100%">
                       <li class="active"><a href="#tab1" data-toggle="tab" class="badge badge-inversee" style="height: 23px">提现记录</a></li>
                        <li><a href="#tab2" data-toggle="tab" class="badge badge-inversee" style="height: 23px">在线取款</a></li>
                        
                    </ul>

                    <div class="tab-content">
						<div class="tab-pane active" id="tab1">
                            <!--提现记录-->
                            <div class="main usercenter">
                                <div class="user_topuprecord">
                                    <div class="user_right right">
                                        <div class="user_main">
                                            <div class="user_body">
                                                <div class="info_select">
                                                    <!--注意不要改变ID的值-->
                                                    
                                                </div>
                                                <div class="buyrecord_data w90" >
                                                    <table class="table">
                                                        <thead style="width: 100%;">
                                                        <tr>
                                                            <th>
                                                                提款金额
                                                            </th>
                                                            <th>
                                                               手续费
                                                            </th>
                                                            <th>
                                                                出款金额
                                                            </th>
                                                            <th>
                                                                  提款状态
                                                            </th>
                                                            <th>
                                                                提款日期
                                                            </th>
                                                            <th>
                  	 提现IP                                           
                                                            </th>
                                                        </tr>
                                                        {if condition="$zcount gt 0"}
                                                        {foreach $touzhulist as $xh_1}
                                                        <tr style=" background: white;">
                                                            <th>
                                                                {$xh_1.txje}
                                                            </th>
                                                            <th>
                                                                0
                                                            </th>
                                                            <th>
                                                                {$xh_1.txje}
                                                            </th>
                                                            <th>
                                                                {$xh_1.zt}
                                                            </th>
                                                            <th>
                                                                {$xh_1.txtime}
                                                            </th>
                                                            <th>
                                                                {$xh_1.txip}
                                                            </th>

                                                        </tr>
                                                        {/foreach}
                                                        {/if}
                                                        </thead>
                                                        {if condition="$zcount elt 0"}
                                                        <tbody>
                                                        <tr>
                                                            <td colspan="10" class="no_border">
                                                                <div class="empty_data">
                                                                    暂无记录
                                                                </div>
                                                            </td>
                                                        </tr>
                                                        </tbody>
                                                        {/if}
                                                    </table>
                                                    <!--页码-->
                                                    <div style="width:98%; height:35px; line-height:35px; margin:auto; border-bottom:#CCCCCC dashed 1px; font-weight:700; color:#339933">

                                                        <div style="width:450px; margin:auto">

                                                            <div style="color:rgba(0,0,0,0.5);width:250px; text-align:center; float:left">共{$zcount}条记录，{$zys}页，当前第{$page}页</div>

                                                            <div style="width:80px; text-align:center; float:left"><a href="{:url('agent/drawMoneyRecord')}?page={$page-1}" style="color:rgba(0,0,0,0.9) " >上一页</a></div>

                                                            <div style="width:80px; text-align:center; float:left"><a href="{:url('agent/drawMoneyRecord')}?page={$page+1}" style="color:rgba(0,0,0,0.9) " >下一页</a></div>

                                                        </div>

                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <!---/Main END/--->
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="tab-pane" id="tab2">
                            <!--在线取款-->
                            <div id="h2" class="wrap st1 {if condition="$res.bankno neq ''"}dis-none{/if}" style="min-height:560px;margin-bottom: 20px;">
                                <div class="right-div" style="margin-left: 30px">
                                    <div id="message_div" class="css1" style="min-height: 537px;">
                                        <div style="margin:2px 39px;border-bottom:1px solid rgb(210,210,210);padding:12px 4px;">
                                            <strong style="display:block;padding:8px 0;font-size:17px;font-weight:600;color:#248ce6;">
                                                使用提示
                                            </strong>
                                            <p style="color:#FF5422;font-size:13px;padding-bottom:7px;">为保护您的资金安全，绑定银行卡后，如需修改请联系客服，以免造成不必要的损失，谢谢。</p>
                                        </div>
                                        <form class="form" id="form_2" name="form1" action="" style="display:block;padding-left: 100px" enctype="application/x-www-form-urlencoded" method="post">
                                            <div class="row">
                                                <label><span><i>*</i>开户人姓名：</span></label>
                                                <div>
                                                    <input name="bankren" id="bankren" type="text" style="width:220px;" placeholder="请输入真实姓名" maxlength="20">
                                                </div>
                                                <div class="alert" style="position: absolute;top:120px;max-width:300px;left:500px;margin: auto;height: 13px;line-height: 13px">
                                                    <strong>Warning!</strong><span></span>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <label><span><i>*</i>开户银行：</span></label>
                                                <div>
                                                    <select name="bankname" id="bankname"  class="width_ipt">
                                                        <option value="0">请选择银行</option>
                                                       {volist name="$bank" id="bk"}
                                                        <option value="{$bk.id}">{$bk.bankname}</option>
                                                       {/volist} 
                                                    </select>
                                                </div>
                                                <div class="alert" style="position: absolute;top:180px;max-width:300px;left:500px;margin: auto;height: 13px;line-height: 13px">
                                                    <strong>Warning!</strong><span></span>
                                                </div>
                                            </div>

                                            <div class="row">
                                                <label><span><i>*</i>银行账号：</span></label>
                                                <div>
                                                    <input name="bankno" id="bankno" type="text" class="width_ipt" placeholder="请输入银行卡号" maxlength="19" style="float: left">
                                                    <div style="color:#999;"><span style="color:#FF0000;margin:-11px 5px 0 14px;padding-top:9px;float: left">*</span>一经确认，再次修改请联系客服</div>
                                                </div>
                                                <div class="alert" style="position: absolute;top:240px;max-width:300px;left:500px;margin: auto;height: 13px;line-height: 13px">
                                                    <strong>Warning!</strong><span></span>
                                                </div>
                                            </div>

                                            <div class="row">
                                                <label><span><i>*</i>开户银行所在省：</span></label>
                                                <div>
                                                    <input name="banksf" id="banksf" type="text" class="width_ipt" placeholder="银行所在省" maxlength="12" style="width:150px">
                                                </div>
                                                <div class="alert" style="position: absolute;top:300px;max-width:300px;left:500px;margin: auto;height: 13px;line-height: 13px">
                                                    <strong>Warning!</strong><span></span>
                                                </div>
                                            </div>

                                            <div class="row">
                                                <label><span><i>*</i>开户银行所在市：</span></label>
                                                <div>
                                                    <input name="banksq" id="banksq" type="text" class="width_ipt" placeholder="银行所在市" maxlength="12" style="width:150px">
                                                </div>
                                                <div class="alert" style="position: absolute;top:360px;max-width:300px;left:500px;margin: auto;height: 13px;line-height: 13px">
                                                    <strong>Warning!</strong><span></span>
                                                </div>
                                            </div>

                                            <div class="row">
                                                <label><span><i>*</i>手机号码：</span></label>
                                                <div>
                                                    <input name="mobile" id="mobile" type="text" class="width_ipt" placeholder="手机号码" maxlength="12">
                                                </div>
                                                <div class="alert" style="position: absolute;top:420px;max-width:300px;left:500px;margin: auto;height: 13px;line-height: 13px">
                                                    <strong>Warning!</strong><span></span>
                                                </div>
                                            </div>

                                            <div class="row">
                                                <label><span><i>*</i>联系QQ号码：</span></label>
                                                <div>
                                                    <input name="qq" id="qq" type="text" class="width_ipt" placeholder="联系QQ号码" maxlength="12">
                                                </div>
                                                <div class="alert" style="position: absolute;top:480px;max-width:300px;left:500px;margin: auto;height: 13px;line-height: 13px">
                                                    <strong>Warning!</strong><span></span>
                                                </div>
                                            </div>

                                            <div class="row">
                                                <label><i>*</i>设置提款密码：</label>
                                                <div>
                                                    <input name="ejmm" id="ejmm" type="password" class="width_ipt" placeholder="请输入6-32位提款密码" maxlength="12">
                                                </div>
                                                <div class="alert" style="position: absolute;top:540px;max-width:300px;left:500px;margin: auto;height: 13px;line-height: 13px">
                                                    <strong>Warning!</strong><span></span>
                                                </div>
                                            </div>
                                            <div class="control-group">
                                                <!--提交提示-->
                                                <div class="alert alert-success pos" id="pos1">
                                                    <strong>提交成功！</strong>
                                                </div>
                                                <div class="alert alert-infos pos" id="pos2">
                                                    <strong>提交失败！</strong>
                                                </div>
                                            </div>
                                            <div style="width:200px;margin-left:130px;margin-top:10px;">
                                                <div  class="btn" id="submit" type="submit">确定</div>
                                            </div>
                                        </form>
                                    </div>
                                </div>
                            </div>
                            <div id="sec" class="main usercenter {if condition="$res.bankno eq ''"}dis-none{/if}">

                                <div class="user_withdraw">
                                    <div class="user_right right">
                                        <div class="user_main">
                                            <div class="user_body">
                                                <div class="topup_main">
                                                    <form method="post" action="{:url('agent/withdrawDeposit')}" id="withdraw_form">
                                                        <div class="main_header">
                                                            <div class="user">
                                                                <em style="font-style: normal;">可提金额:</em><span>¥{$res.je}</span>
                                                            </div>
                                                            <div class="money">
                                                                <label for=""><em class="red">＊</em>取款金额:</label>
                                                                <div class="form">
                                                                    <div class="form_group">
                                                                        <input type="text" placeholder="请输入提现金额" name="amount" id="amount" autocomplete="new-password" onkeyup="value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]|^0{1,}\d{1,}|[\,,\.]{1,}/g,&#39;&#39;)">
                                                                    </div>
                                                                </div>
                                                                <span class="remark">单笔限额为:{$draw.zxje}～{$draw.zdje}</span>
                                                            </div>
                                                        </div>
                                                        <div class="pay_type">
                                                            <h2>提现至:</h2>
                                                            <div class="pay_main" id="withdraw_type_main" >
                                                                <ul style="margin: 0 0 10px 0px;" class="hover">
                                                                    <li class="active" onclick="" id="pay_55783" style="box-sizing: border-box;margin-right: 25px"><span class="bank_logo"></span><span class="bank_number">{$res.bankno}</span><span class="account_name" style="width:50px;"><em>{$res.bankren}</em></span></li>
                                                                </ul>
                                                            </div>
                                                            <input type="hidden" style="display:none" name="user_bank_id" value="{$res.bankno}" id="withdraw_type_value">
                                                        </div>
                                                        <div class="pay_password">
                                                            <label for=""><em class="red">＊</em>资金密码:</label>
                                                            <div class="form">
                                                                <div class="form_group">
                                                                    <input type="password" onkeyup="resetSubmit()" placeholder="请输入资金密码" name="funds_password" id="funds_password" autocomplete="new-password">
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <input type="submit" id="withdraw_submit" name="submit" value="下一步" class="btn btn-default btn-radius" style="background:#ff9328">
                                                    </form>
                                                    <div class="account_b">
                                                        <table class="table">
                                                            <tbody>
                                                            <tr>
                                                                <td width="140">
                                                                    账户余额
                                                                </td>
                                                                <td width="250">
                                                                    {$res.je}元
                                                                </td>
                                                                <td width="140">
                                                                    单笔限额
                                                                </td>
                                                                <td width="250">
                                                                    {$draw.zxje}～{$draw.zdje}元
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    可提金额
                                                                </td>
                                                                <td>
                                                                    {$res.je}元
                                                                </td>
                                                                <td>
                                                                    今日已提次数
                                                                </td>
                                                                <td>
                                                                    {$cs}次
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    取款时间
                                                                </td>
                                                                <td>
                                                                    00:00~24:00
                                                                </td>
                                                                <td>
                                                                    每日限制次数
                                                                </td>
                                                                <td>
                                                                {if condition="$draw.txcount eq 0"}
                                                                    999999
                   												{else}	                                                 
                                                                    {$draw.txcount}
                                                                {/if}
                                                                次
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    今日已提金额
                                                                </td>
                                                                <td>
                                                                    {$tx}元
                                                                </td>
                                                                <td>
                                                                    每日限制金额
                                                                </td>
                                                                <td>
                                                                    1000000.00元
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    手续费说明
                                                                </td>
                                                                <td colspan="3">
                                                                    <div class="left">
                                                                        每日免手续费次数：{if condition="$draw.txcount eq 0"}999999{else}{$draw.txcount}{/if}次。超出后当天无法提现。
                                                                    </div>
                                                                    <div class="right">
                                                                        
                                                                    </div>
                                                                </td>
                                                            </tr>
                                                            </tbody>
                                                        </table>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        
                        
                        
                    </div>
                </div>

            </div>
       </div>
    </div>
</div>
</body>
<script>
    $(document).ready(function () {
         $(".user_withdraw .user_body .topup_main .pay_type .pay_main ul li.hover, .user_withdraw .user_body .topup_main .pay_type .pay_main ul li").each(function(index,value){
             $(this).click(function(){
                 $(".user_withdraw .user_body .topup_main .pay_type .pay_main ul li.hover, .user_withdraw .user_body .topup_main .pay_type .pay_main ul li").removeClass('active');
                 $(this).addClass('active');
             })
         })

//提交
        var static0=false;
        var reg = new RegExp("[\\u4E00-\\u9FFF]+","g");
        var reg2= new RegExp("^[a-z]");
//校验
        $("#bankren,#bankname,#bankno,#banksf,#banksq,#mobile,#qq,#ejmm").blur(function() {
            $("#pos1").css({'display':'none'});
            $("#pos2").css({'display':'none'});
            static0=true;
            var that1=$(this).parent().siblings('.alert');
            var that2=$(this).parent().siblings('.alert').children('span').get(0);
            that1.css({'display':'block'})
            if($(this).val().trim()===''){
                that2.innerText='不能为空！'
                static0=false;
            }else{
                that1.css({'display':'none'})
                that2.innerText=''
            }
        });

        $('#submit').eq(0).click(function(){
            if(static0===true){
                $.ajax({
                    url:"{:url('agent/bankBind')}",
                    type:"POST",
                    data:$('#form_2').serialize(),
                    success: function(data) {
                        if(data=="ok"){
                            $('#pos1').css({'display':'block'});
                            $('#h2').addClass('dis-none');
                            $('#sec').removeClass('dis-none');
                        }else{
                            $('#pos2').css({'display':'block'});
                        }
                    }
                });

            }else{
                $('#pos2').css({'display':'block'});
            }
        })


    })
</script>
</html>